//
//  VersionTableViewController.m
//  Login
//
//  Created by mac on 17/3/15.
//  Copyright © 2017年 ZF. All rights reserved.
//

#import "VersionTableViewController.h"
#import "NetworkLink.h"

@interface VersionTableViewController ()
{
    NSString *appVersion;
}
@end

@implementation VersionTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tabBarController.tabBar.hidden = YES;
    self.tableView.scrollEnabled = NO;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    NSDictionary *infoDictonary = [[NSBundle mainBundle] infoDictionary];
    appVersion = [infoDictonary objectForKey:@"CFBundleShortVersionString"];
    NSLog(@"本地版本:%@",appVersion);
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
    cell.textLabel.text = @"本地版本";
    cell.detailTextLabel.text = appVersion;
    
    UIView *view = [UIView new];
    view.backgroundColor = COLOR(215, 215, 215, 1);
    view.frame = CGRectMake(0, 43, tableView.frame.size.width, 1);
    [cell addSubview:view];
    
    view = [UIView new];
     view.backgroundColor = COLOR(215, 215, 215, 1);
    view.frame = CGRectMake(0, 1, tableView.frame.size.width, 1);
    [cell addSubview:view];
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 30;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
